package com.infnoon.parking.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.Builder;
import lombok.Data;

/**
 * 
 * @TableName vehicles
 */
@TableName(value ="vehicles")
@Data
@Builder
public class Vehicles implements Serializable {
    /**
     * 
     */
    @TableId
    private String carnumber;

    /**
     * 
     */
    private String car_Type;

    /**
     * 
     */
    private String manufacturer;

    /**
     * 
     */
    private Double car_long;

    /**
     * 
     */
    private Double car_wide;

    /**
     * 
     */
    private String phoneNumber;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Vehicles other = (Vehicles) that;
        return (this.getCarnumber() == null ? other.getCarnumber() == null : this.getCarnumber().equals(other.getCarnumber()))
            && (this.getCar_Type() == null ? other.getCar_Type() == null : this.getCar_Type().equals(other.getCar_Type()))
            && (this.getManufacturer() == null ? other.getManufacturer() == null : this.getManufacturer().equals(other.getManufacturer()))
            && (this.getCar_long() == null ? other.getCar_long() == null : this.getCar_long().equals(other.getCar_long()))
            && (this.getCar_wide() == null ? other.getCar_wide() == null : this.getCar_wide().equals(other.getCar_wide()))
            && (this.getPhoneNumber() == null ? other.getPhoneNumber() == null : this.getPhoneNumber().equals(other.getPhoneNumber()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCarnumber() == null) ? 0 : getCarnumber().hashCode());
        result = prime * result + ((getCar_Type() == null) ? 0 : getCar_Type().hashCode());
        result = prime * result + ((getManufacturer() == null) ? 0 : getManufacturer().hashCode());
        result = prime * result + ((getCar_long() == null) ? 0 : getCar_long().hashCode());
        result = prime * result + ((getCar_wide() == null) ? 0 : getCar_wide().hashCode());
        result = prime * result + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", carnumber=").append(carnumber);
        sb.append(", car_Type=").append(car_Type);
        sb.append(", manufacturer=").append(manufacturer);
        sb.append(", car_long=").append(car_long);
        sb.append(", car_wide=").append(car_wide);
        sb.append(", phoneNumber=").append(phoneNumber);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}